package wowplan;

import wowplan.codegen.EntityInfoUtil;
import org.junit.Test;

import java.util.Arrays;


public class MainGenCode {
    String[] tableNames = {
//            "iot_chip"
//            "iot_control_gpio_biz"
//            "iot_native_device"
            "iot_control_center" // 借一张空表生成页面
    };
    @Test
    public void genCode() {
        String packageName = "com.ruoyi.project.business";
        // select table_name, table_comment, create_time, update_time from information_schema.tables
        //		where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
        //		and table_name = ''

        String tablePrefix = "iot_";
        Arrays.stream(tableNames).forEach(tableName -> {
            EntityInfoUtil.generatorCodeToDisk(tableName, packageName, tablePrefix);
        });
    }

}